
import Chart from '@/components/Charts/index'
import { mapGetters, mapActions } from 'vuex'
export default {
    props: {
        data:{
            type: Object
        }
    },
    computed: {
		...mapGetters(['editSuccess','echartColors']),
	},
    watch: {
        'data.options.sourceId': {
            handler() {
                this._getNewEcharts()
            },
        },
        editSuccess: {
            handler(val) {
                if(val) {
                    this._getNewEcharts()
                    this.editSuccessChange(false)
                }
            },
            deep: true
        },
    },
    components: { Chart },
    methods: {
        ...mapActions([
            'editSuccessChange',
        ]),
    }
}
